<script setup lang="ts" name="LoveTalk">
import {useLoveTalk} from "@/store/loveTalk";
const loveTalkStore = useLoveTalk()
 function getLoveTalk (){
    loveTalkStore.getTalk()
}
</script>

<template>
  <div class="talk">
    <button @click="getLoveTalk">点击获取一句土味情话</button>
    <ul>
      <li v-for="item in loveTalkStore.talkList" :key="item.id">{{item.title}}</li>
    </ul>
  </div>
</template>

<style scoped>
  .talk{
    background: orange;
    padding: 20px;
    box-shadow: 0 0 10px;
    border-radius: 10px;
  }
</style>